<%--
  Created by IntelliJ IDEA.
  User: Jiao
  Date: 2021/4/21
  Time: 19:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/hccg/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="/hccg/assets/css/font-awesome.min.css" />
    <!--[if IE 7]>
    <link rel="stylesheet" href="/hccg/assets/css/font-awesome-ie7.min.css" />
    <![endif]-->
    <link rel="stylesheet" href="/hccg/assets/css/jquery-ui-1.10.3.full.min.css">
    <link rel="stylesheet" href="/hccg/assets/css/ace.min.css" />
    <link rel="stylesheet" href="/hccg/css/style.css"/>
    <title>项目立项</title>
</head>

<body>

<div class="page-content">
    <form action="/hccg/tbXm/update" method="post">
        <div class="Manager_style">
            <span class="title_name">项目修改</span>
            <div class="project_style">
                <ul class="Add_Manager_style clearfix">
                    <li><label class="label_name">项目名称</label><input value="${list.xmName}" name="xmName" type="text"  class="text" style=" width:570px; "/></li>
                    <li><label class="label_name">项目类型</label><input value="${list.xmType}"  name="xmType" type="text"  class="text" style=" width:250px; "/></li>
                    <li><label class="label_name">产品名称</label><input value="${list.xmProduceName}"  name="xmProduceName" type="text"  class="text" style=" width:250px; "/></li>
                    <li><label class="label_name">价格</label><input value="${list.xmPrice}" name="xmPrice" type="text"  class="text" style=" width:250px; "/></li>
                    <li><label class="label_name">数量</label><input value="${list.xmCount}" name="xmCount" type="text"  class="text" style=" width:250px; "/></li>
                    <li><label class="label_name">总价格</label><input value="${list.xmTotalPrice}" name="xmTotalPrice" type="text"  class="text" style=" width:250px; "/></li>
                    <li><label class="label_name">是否加急</label><select value="${list.xmImport}" name="xmImport" size="1" style="width:250px; margin-left:10px" >
                        <option value="">--选择--</option>
                        <option value="1">普通项目</option>
                        <option value="2">紧急项目</option>
                    </select></li>
                    <li><label class="label_name">创建日期</label> <input  value="<fmt:formatDate value="${list.xmCreatDate}" pattern="yyyy-MM-dd"/>" name="xmCreateDate" class="inline laydate-icon" id="time1" style="width:250px; margin-left:10px"/></li>
                    <li><label class="label_name">截止日期</label> <input value="<fmt:formatDate value="${list.xmEndDate}" pattern="yyyy-MM-dd"/>" name="xmEndDate" class="inline laydate-icon" id="start" style="width:250px; margin-left:10px"/></li>
                </ul>
            </div>
        </div>
        <input type="hidden" value="${list.id}" name="id">
        <div class="btn_operating"><button id="submit" class="btn btn-info" type="submit">提交并查询</button></div>
    </form>
</div>


<script src="/hccg/assets/js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="/hccg/assets/layer/layer.js" type="text/javascript"></script>
<script src="/hccg/assets/laydate/laydate.js" type="text/javascript"></script>
<script>
    laydate({
        elem: '#start',
        event: 'focus'
    });
    laydate({
        elem: '#time1', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
        event: 'focus' ,//响应事件。如果没有传入event，则按照默认的click
        format: 'YYYY-MM-DD hh:mm',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59', //最大日期
        istime: true,
        istoday: false,
    });
    /***判断用户添加文本**/
    jQuery(document).ready(function(){

        $("#submit").click(function(){
            // var num=0;
            var str="";
            $("input[type$='text'],select").each(function(n){
                if($(this).val()=="")
                {
                    // num++;
                    layer.alert(str+=""+$(this).attr("name")+"不能为空！\r\n",{
                        title: '提示框',
                        icon:0,
                    });
                    // layer.msg(str+=""+$(this).attr("name")+"不能为空！\r\n");
                    layer.close(index);
                }

            });

        });
    });
</script>
</body>
</html>
